package com.jrx.anytxn.transaction.dto.common;

import com.jrx.anytxn.common.constant.RegexConstant;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @ClassName CommonReq
 *  通用请求属性
 * @author  haopu.zheng
 * date  2019/7/22
 * @Version V1.0
 **/

public class CommonReq implements Serializable {
    /**
     * 交易流水号
    **/
    @ApiModelProperty(value = "流水号",required = true)
    @Pattern(regexp = RegexConstant.ALL_CHARSET_AND_NUMBER, message = "流水号只能是英文字母和数字组成且不可为空")
    private String seqNo;
    /**
     * 租户ID
     **/
    @ApiModelProperty(value = "租戶id",required = true)
    @Size(max=4, message = "租戶id不能超过4位")
    @NotEmpty(message = "租戶id不可空")
    private String tenantId;
    /**
     * 用户编号
     */
    @Size(max=20, message = "用户编号不能超过20位")
    @ApiModelProperty(value = "用户编号",required = true)
    @NotEmpty(message = "用户编号不能为空")
    private String userId;
    /**
     * 渠道号
     */
    @ApiModelProperty(value = "渠道号", required = true)
    @Size(max=32 , message = "渠道号不能超过32位")
    @NotEmpty(message = "渠道号不能为空")
    private String channel;

    /**
     * 子渠道号
     */
    @ApiModelProperty(value = "子渠道号", required = true)
    @Size(max=32 , message = "子渠道号不能超过32位")
    private String subChannel;

    /**
     * 外部渠道号
     */
    @ApiModelProperty(value = "外部渠道号", required = true)
    @Size(max=32 , message = "外部渠道号不能超过32位")
    private String thirdChannel;

    /**
     * 商户ID
     */
    private String merchantId;

    /**
     * 商户名称
     */
    private String merchantName;

    public String getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(String seqNo) {
        this.seqNo = seqNo;
    }

    /**
     * 获取用户编号
     **/
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    /**
     * 获取渠道号
     **/
    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getSubChannel() {
        return subChannel;
    }

    public void setSubChannel(String subChannel) {
        this.subChannel = subChannel;
    }

    public String getThirdChannel() {
        return thirdChannel;
    }

    public void setThirdChannel(String thirdChannel) {
        this.thirdChannel = thirdChannel;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }
}
